package com.example.demo.service;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.base.mapper.BaseService;
import com.example.demo.entity.BookComment;
import com.example.demo.mapper.BookCommentMapper;

/**
 * 评论接口
 * 
 * @author wang
 *
 */
@Service
public class BookCommentServiceImpl extends BaseService<BookComment> {

	@Autowired
	private BookCommentMapper bookCommentMapper;

	/**
	 * 查询书的平均分
	 * 
	 * @param map
	 * @return
	 */
	public Float getByMapAvg(Map<String, Object> map) {
		return bookCommentMapper.getByMapAvg(map);
	}

	/**
	 * 计算总分
	 * 
	 * @param map
	 * @return
	 */
	public Float getByMapGradeTotal(Map<String, Object> map) {
		return bookCommentMapper.getByMapGradeTotal(map);
	}
	
	
	
	
}
